
#include <Arduino.h>
#include <U8g2lib.h>

#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif

const uint8_t xx_font2[1013] U8G2_FONT_SECTION("xx_font2") = 
  "\200\0\2\2\3\3\3\4\4\5\7\0\377\6\377\6\0\1\271\2\326\3\330\0\12-\261I\65\314 \303"
  "T\1\5\0\61\1\2\5\0\61\1\3\5\0\61\1\4\5\0\61\1\5\5\0\61\1\6\5\0\61\1\7"
  "\5\0\61\1\10\5\0\61\1\11\5\0\61\1\12\5\0\61\1\13\5\0\61\1\14\5\0\61\1\15\5\0"
  "\61\1\16\5\0\61\1\17\5\0\61\1\20\5\0\61\1\21\5\0\61\1\22\5\0\61\1\23\5\0\61\1"
  "\24\5\0\61\1\25\5\0\61\1\26\5\0\61\1\27\5\0\61\1\30\5\0\61\1\31\5\0\61\1\32\5"
  "\0\61\1\33\5\0\61\1\34\5\0\61\1\35\5\0\61\1\36\5\0\61\1\37\5\0\61\1 \5\0\261"
  "\1!\6\261\261\31)\42\7[\267IV\0#\12-\261\253\206\252\206\252\0$\12-\261[\65\330 "
  "\245\5%\11\64\261\311 \366\6\1&\11,\261\213)V\61\5'\5\231\267\31(\7r\261S\315\0"
  ")\10r\261\211\251R\0*\7k\261I\325j+\12-\261\315(\16\231Q\4,\7[\257S%\0"
  "-\6\14\265\31\1.\6R\261\31\1/\7$\263\7\261\15\60\12\64\261SQ\215$\223\2\61\7s"
  "\261K\262\65\62\12\64\261S\61\203X\216\0\63\13\64\261\31\31$\215dR\0\64\12\64\261\215\252\32"
  "\61\203\4\65\12\64\261\31\32l$\223\2\66\12\64\261S\31\254(\223\2\67\13\64\261\31\31\304\14b"
  "\6\21\70\12\64\261S\61\251(\223\2\71\12\64\261SQ\246\15\222\2:\7j\261\31q\4;\10\63"
  "\257\263\221*\1<\10k\261M\65\310 =\10\34\263\31\31\215\0>\11k\261\311 \203T\2\77\11"
  "s\261k\246\14\23\0@\11\64\261SQ\335H\1A\11\64\261SQ\216)\3B\12\64\261Yq\244"
  "(G\2C\13\64\261SQ\203\14bR\0D\11\64\261Y\321\71\22\0E\13\64\261\31\32\254\14\62"
  "\30\1F\13\64\261\31\32\254\14\62\310\0G\12\64\261SQ\203\64\323\0H\10\64\261\211rL\63I"
  "\7\63qY\261\65J\13\64\261\7\31d\220\201L\12K\12\64\261\211*I\231\312\0L\14\64\261\311"
  " \203\14\62\310`\4M\11\64\261\211\343\210f\0N\10\64\261\211k\251\63O\11\64\261S\321\231\24"
  "\0P\12\64\261YQ\216\224A\6Q\12<\257S\321\134I\243\0R\11\64\261YQ\216\324\14S\12"
  "\64\261S\61eT&\5T\7\63qY\261\13U\10\64\261\211\236I\1V\11\64\261\211\316$\25\0"
  "W\11\64\261\211\346\70b\0X\12\64\261\211\62I\25e\0Y\10s\261IVY\1Z\12\64\261\31"
  "\31\304\66\30\1[\7s\261\31\261\71\134\11$\263\311(\243\214\2]\7s\261\231\315\21^\5S\271"
  "k_\6\14\261\31\1`\6R\271\211\1a\10$\261\33Q\251\2b\13\64\261\311 \203\25\345H\0"
  "c\7#\261\233\31\10d\12\64\261\7\31\244\21e\32e\11$\261Sid\240\0f\11\64\261\255\312"
  "\231A\4g\11,\257\33\61\251\214\6h\12\64\261\311 \203\25\315\0i\10s\261\313HV\3j\11"
  "{\257\315\260T\25\0k\13\64\261\311 \203\224d*\3l\7s\261\221]\3m\10$\261IiH"
  "\31n\7$\261Y\321\14o\10$\261SQ&\5p\11,\257YQ\216\224\1q\11,\257\33Q\246"
  "\15\2r\10$\261YQ\203\14s\10$\261\33\32\15\5t\12\64\261\313 \316\14\62\22u\7$\261"
  "\211f\32v\7c\261IV\5w\7$\261\211r\34x\10$\261\211I\252\30y\11,\257\211\62\225"
  "%\0z\10$\261\31\261\34\1{\10s\261MI\326 |\5\261\261\71}\12s\261\311 \252\230\42"
  "\0~\7\24\271K*\1\177\5\0\61\1\0\0\0\4\377\377\0";




const uint8_t battery_7x12[118] U8G2_FONT_SECTION("battery_7x12") = 
  "\5\0\4\4\4\3\1\1\5\14\7\0\0\7\0\0\0\0\0\0\0\0Y\60\15\374\71\254\10\31\42\344"
  ",C\254\0\61\22\374\71\254\10\31\42\272\21\341F\204\33\31b\5\0\62\22\374\71\254\10\31\42V#"
  "\242\32\21\325\310\20+\0\63\23\374\71\254\10\31\42nF\304fDlF\206X\1\0\64\23\374\71\254"
  "\10\31\42^\214\210\213\21q\61\62\304\12\0\0\0\0\4\377\377\0";
  
const uint8_t xx_font[851] U8G2_FONT_SECTION("xx_font") = 
  "`\0\2\2\3\3\3\4\4\5\7\0\377\6\377\6\0\1\34\2\71\3\66\0\12-\261I\65\314 \303"
  "T \5\0\275\1!\6\261\261\31)\42\7[\267IV\0#\12-\261\253\206\252\206\252\0$\12-"
  "\261[\65\330 \245\5%\11\64\261\311 \366\6\1&\11,\261\213)V\61\5'\5\231\267\31(\7"
  "r\261S\315\0)\10r\261\211\251R\0*\7k\261I\325j+\12-\261\315(\16\231Q\4,\7"
  "[\257S%\0-\6\14\265\31\1.\6R\261\31\1/\7$\263\7\261\15\60\10s\261\253\134\25\0"
  "\61\7s\261K\262\65\62\12\64\261S\61\203X\216\0\63\13\64\261\31\31$\215dR\0\64\12\64\261"
  "\215\252\32\61\203\4\65\12\64\261\31\32l$\223\2\66\12\64\261S\31\254(\223\2\67\13\64\261\31\31"
  "\304\14b\6\21\70\12\64\261S\61\251(\223\2\71\12\64\261SQ\246\15\222\2:\7j\261\31q\4"
  ";\10\63\257\263\221*\1<\10k\261M\65\310 =\10\34\263\31\31\215\0>\11k\261\311 \203T"
  "\2\77\11s\261k\246\14\23\0@\11\64\261SQ\335H\1A\11\64\261SQ\216)\3B\12\64\261"
  "Yq\244(G\2C\13\64\261SQ\203\14bR\0D\11\64\261Y\321\71\22\0E\13\64\261\31\32"
  "\254\14\62\30\1F\13\64\261\31\32\254\14\62\310\0G\12\64\261SQ\203\64\323\0H\10\64\261\211r"
  "L\63I\7s\261Y\261\65J\13\64\261\7\31d\220\201L\12K\12\64\261\211*I\231\312\0L\14"
  "\64\261\311 \203\14\62\310`\4M\11\64\261\211\343\210f\0N\10\64\261\211k\251\63O\11\64\261S"
  "\321\231\24\0P\12\64\261YQ\216\224A\6Q\12<\257S\321\134I\243\0R\11\64\261YQ\216\324"
  "\14S\12\64\261S\61eT&\5T\7s\261Y\261\13U\10\64\261\211\236I\1V\11\64\261\211\316"
  "$\25\0W\11\64\261\211\346\70b\0X\12\64\261\211\62I\25e\0Y\10s\261IVY\1Z\12"
  "\64\261\31\31\304\66\30\1[\7s\261\31\261\71\134\11$\263\311(\243\214\2]\7s\261\231\315\21^"
  "\5S\271k_\6\14\261\31\1`\6R\271\211\1a\10$\261\33Q\251\2b\13\64\261\311 \203\25"
  "\345H\0c\7#\261\233\31\10d\12\64\261\7\31\244\21e\32e\11$\261Sid\240\0f\11\64"
  "\261\255\312\231A\4g\11,\257\33\61\251\214\6h\12\64\261\311 \203\25\315\0i\10s\261\313HV"
  "\3j\11{\257\315\260T\25\0k\13\64\261\311 \203\224d*\3l\7s\261\221]\3m\10$\261"
  "IiH\31n\7$\261Y\321\14o\10$\261SQ&\5p\11,\257YQ\216\224\1q\11,\257"
  "\33Q\246\15\2r\10$\261YQ\203\14s\10$\261\33\32\15\5t\12\64\261\313 \316\14\62\22u"
  "\7$\261\211f\32v\7c\261IV\5w\7$\261\211r\34x\10$\261\211I\252\30y\11,\257"
  "\211\62\225%\0z\10$\261\31\261\34\1{\10s\261MI\326 |\5\261\261\71}\12s\261\311 "
  "\252\230\42\0~\7\24\271K*\1\0\0\0\4\377\377\0";
>>>>>>> fonts

#define full_width 128
#define full_height 64
static unsigned char full_bits[] = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x38, 0x04, 0x0F, 0xFE, 0x03, 0x00, 0x70, 0x1C,
  0x10, 0x0E, 0x00, 0x80, 0x7B, 0x20, 0xF8, 0x3F, 0x44, 0xC4, 0x30, 0x06,
  0x03, 0x00, 0x88, 0x22, 0x18, 0x01, 0x00, 0x00, 0x89, 0x68, 0x08, 0x20,
  0x28, 0x25, 0x40, 0x8A, 0x02, 0x00, 0xC8, 0x22, 0x11, 0x01, 0x00, 0x00,
  0x89, 0xB0, 0xA8, 0x6A, 0x10, 0x05, 0x0F, 0x52, 0x02, 0x00, 0xA8, 0x1C,
  0x10, 0x0F, 0x00, 0x00, 0x79, 0x60, 0xA8, 0x6A, 0x50, 0x85, 0x10, 0x22,
  0x02, 0x00, 0x98, 0x22, 0x11, 0x11, 0x00, 0x00, 0x29, 0xB0, 0xA8, 0x6A,
  0x50, 0x05, 0x00, 0x02, 0x02, 0x00, 0x88, 0x22, 0x10, 0x11, 0x00, 0x00,
  0x49, 0x68, 0x08, 0x20, 0x50, 0x05, 0x06, 0xFE, 0x03, 0x00, 0x70, 0x1C,
  0x38, 0x0E, 0x00, 0x80, 0x8B, 0x20, 0xF8, 0x3F, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
  0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
  0xF8, 0x0F, 0xC7, 0x21, 0x0E, 0xE0, 0x10, 0x40, 0x1C, 0xF8, 0x1E, 0x87,
  0x00, 0x88, 0x08, 0x00, 0x28, 0x8A, 0x28, 0x32, 0x11, 0x10, 0x19, 0x60,
  0x22, 0x08, 0x22, 0x82, 0x00, 0x90, 0x04, 0x00, 0x08, 0x08, 0x28, 0x23,
  0x11, 0x90, 0x11, 0x40, 0x22, 0x08, 0x22, 0x82, 0x00, 0xC0, 0x01, 0x00,
  0xA8, 0x0A, 0xA7, 0x22, 0x9E, 0x53, 0x11, 0x47, 0x1C, 0x78, 0x1E, 0x82,
  0x00, 0x20, 0x02, 0x00, 0x08, 0x88, 0x60, 0x22, 0x10, 0x30, 0x11, 0x40,
  0x22, 0x08, 0x0A, 0x82, 0x00, 0x38, 0x0E, 0x00, 0xA8, 0x8A, 0x20, 0x22,
  0x10, 0x10, 0x11, 0x40, 0x22, 0x08, 0x12, 0x82, 0x00, 0x20, 0x02, 0x00,
  0x08, 0x88, 0xCF, 0x71, 0x0E, 0xE0, 0x38, 0xE0, 0x1C, 0x08, 0x22, 0x87,
  0x00, 0xC0, 0x01, 0x00, 0xF8, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x80, 0x00, 0x90, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x88, 0x08, 0x00,
  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01, 0x9C, 0x39,
  0xB8, 0x07, 0xE2, 0x38, 0x40, 0x38, 0x0E, 0x90, 0x8F, 0x00, 0x71, 0x9C,
  0x80, 0x01, 0x02, 0x44, 0x90, 0x08, 0x13, 0x45, 0x60, 0x04, 0x11, 0x18,
  0xC8, 0x80, 0x89, 0x82, 0x40, 0x11, 0x02, 0x04, 0x90, 0x08, 0x12, 0x41,
  0x40, 0x04, 0x11, 0x10, 0x84, 0x00, 0x81, 0x82, 0x2E, 0xA9, 0x1E, 0x04,
  0x90, 0x07, 0xE2, 0x39, 0x40, 0x3C, 0x0E, 0x10, 0x86, 0x00, 0x71, 0x9E,
  0xE0, 0x43, 0x22, 0x04, 0x90, 0x00, 0x02, 0x05, 0x40, 0x44, 0x11, 0x10,
  0x88, 0x00, 0x09, 0xA2, 0x00, 0x01, 0x22, 0x44, 0x90, 0x00, 0x02, 0x05,
  0x46, 0x44, 0x91, 0x91, 0x88, 0x18, 0x09, 0xA2, 0x00, 0x01, 0x1C, 0x38,
  0xB8, 0x00, 0xE7, 0x7C, 0xE6, 0x38, 0x8E, 0x39, 0xCF, 0x99, 0xFB, 0x9C,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
  0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x80, 0xE0, 0xC1, 0x80, 0x01, 0x50, 0x01, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0xC2, 0x81, 0x02,
  0x00, 0x80, 0xCF, 0x79, 0x3E, 0x07, 0x1C, 0x38, 0x88, 0x13, 0x45, 0x80,
  0x48, 0xC4, 0x83, 0x04, 0xF4, 0x85, 0x20, 0x8A, 0xA0, 0x08, 0x22, 0x44,
  0x4C, 0xB4, 0x45, 0x80, 0x48, 0xC4, 0x87, 0x08, 0x10, 0x81, 0x20, 0x88,
  0x10, 0x08, 0x3A, 0x40, 0x4A, 0x56, 0x45, 0x9F, 0xC8, 0xC5, 0x8F, 0x10,
  0x14, 0x85, 0xC7, 0x79, 0x18, 0x07, 0x2A, 0x38, 0x49, 0x55, 0x7D, 0x88,
  0x08, 0xC4, 0x83, 0x08, 0x10, 0x81, 0x00, 0x0A, 0xA0, 0x00, 0x1A, 0x04,
  0xDF, 0x14, 0x45, 0x84, 0x10, 0xC2, 0x82, 0x06, 0xF4, 0x85, 0x20, 0x0A,
  0xA2, 0x00, 0x02, 0x04, 0x48, 0x14, 0x45, 0x82, 0xE0, 0x01, 0x82, 0x05,
  0x00, 0x80, 0xCF, 0x09, 0xBC, 0x0F, 0x3C, 0x7C, 0x88, 0x13, 0x45, 0x9F,
  0x00, 0x00, 0x04, 0x08, 0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
  0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00,
  0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x03, 0x04,
  0xE0, 0x03, 0x04, 0xF0, 0x1F, 0x40, 0x00, 0x08, 0x40, 0x00, 0x49, 0x00,
  0x00, 0x01, 0x04, 0x04, 0xF0, 0x07, 0x04, 0x10, 0x10, 0x40, 0x80, 0x28,
  0x40, 0x80, 0x4B, 0x00, 0x00, 0x09, 0x04, 0x04, 0x10, 0x04, 0x04, 0x50,
  0x10, 0x40, 0x40, 0x44, 0x40, 0x00, 0x49, 0x00, 0x00, 0x1D, 0x04, 0x04,
  0x10, 0x04, 0x04, 0x90, 0x10, 0x40, 0x20, 0x84, 0x40, 0x00, 0xE9, 0x00,
  0x00, 0x49, 0x05, 0x04, 0x38, 0x0E, 0x04, 0x50, 0x16, 0x40, 0x40, 0x44,
  0x40, 0x00, 0x49, 0x00, 0x00, 0x01, 0x04, 0x04, 0x38, 0x0E, 0x04, 0x10,
  0x10, 0x40, 0x80, 0x22, 0x40, 0x00, 0x5D, 0x00, 0x00, 0xFE, 0x03, 0x04,
  0x38, 0x0E, 0x04, 0xF0, 0x1F, 0x40, 0x00, 0x02, 0x40, 0x00, 0x49, 0x00,
  0x00, 0x00, 0x00, 0x04, 0x30, 0x06, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00,
  0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00,
  0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x3C, 0x22, 0xFA, 0x44,
  0xF4, 0x7C, 0xE4, 0x21, 0x9C, 0x48, 0x38, 0xCF, 0x47, 0xCF, 0xF3, 0x7D,
  0x22, 0x65, 0x0B, 0xC4, 0x16, 0x41, 0x24, 0x52, 0xA2, 0x48, 0x10, 0x51,
  0x40, 0x51, 0x14, 0x04, 0x82, 0xA8, 0x0A, 0x44, 0x15, 0x21, 0x24, 0x8A,
  0x82, 0x48, 0x10, 0x51, 0x40, 0x51, 0x14, 0x04, 0x82, 0xA8, 0x7A, 0x44,
  0xF5, 0x30, 0xE4, 0x89, 0x9C, 0x4F, 0x10, 0xD1, 0x43, 0xCF, 0xF3, 0x3C,
  0xB2, 0x2F, 0x0A, 0x44, 0x14, 0x40, 0x24, 0xFA, 0xA0, 0x48, 0x10, 0x51,
  0x40, 0x41, 0x11, 0x04, 0xA2, 0x28, 0x0A, 0x44, 0x14, 0x44, 0x24, 0x8A,
  0xA2, 0x48, 0x10, 0x51, 0x40, 0x41, 0x12, 0x04, 0xBC, 0x28, 0xFA, 0x44,
  0x14, 0x78, 0xE4, 0x89, 0x9C, 0x48, 0x38, 0xCF, 0x47, 0x41, 0xF4, 0x05,
  0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00, 0x00,
  0x40, 0x00, 0x00, 0x00,
};

#define battery_width 12
#define battery_height 7
static const unsigned char battery_bits[] U8X8_PROGMEM = {
  0xFF, 0x0F, 0xFF, 0x0F, 0xFF, 0x0F, 0xFF, 0x0F, 0xFF, 0x0F, 0xFF, 0x0F,
  0xFF, 0x0F,
};

#define battery_no_width 12
#define battery_no_height 7
static unsigned char battery_no_bits[] U8X8_PROGMEM = {
  0xFF, 0x07, 0x01, 0x04, 0x55, 0x0D, 0x55, 0x0D, 0x55, 0x0D, 0x01, 0x04,
  0xFF, 0x07,
};


/*
  U8glib Example Overview:
    Frame Buffer Examples: clearBuffer/sendBuffer. Fast, but may not work with all Arduino boards because of RAM consumption
    Page Buffer Examples: firstPage/nextPage. Less RAM usage, should work with all Arduino boards.
    U8x8 Text Only Example: No RAM usage, direct communication with display controller. No graphics, 8x8 Text only.

*/
U8G2_SH1107_64X128_F_4W_HW_SPI u8g2(U8G2_R3, /* cs=*/ 14, /* dc=*/ 27, /* reset=*/ 33);

// End of constructor list


void u8g2_prepare(void) {
  // u8g2.setFont(u8g2_font_6x10_tf);
  u8g2.setFont(u8g2_font_5x7_tf);
  // u8g2.setFont(u8g2_font_micro_tr);
  u8g2.setFontRefHeightExtendedText();
  u8g2.setDrawColor(1);
  u8g2.setFontPosTop();
  u8g2.setFontDirection(0);
}


#define cross_width 24
#define cross_height 24
static const unsigned char cross_bits[] U8X8_PROGMEM  = {
  0x00, 0x18, 0x00, 0x00, 0x24, 0x00, 0x00, 0x24, 0x00, 0x00, 0x42, 0x00,
  0x00, 0x42, 0x00, 0x00, 0x42, 0x00, 0x00, 0x81, 0x00, 0x00, 0x81, 0x00,
  0xC0, 0x00, 0x03, 0x38, 0x3C, 0x1C, 0x06, 0x42, 0x60, 0x01, 0x42, 0x80,
  0x01, 0x42, 0x80, 0x06, 0x42, 0x60, 0x38, 0x3C, 0x1C, 0xC0, 0x00, 0x03,
  0x00, 0x81, 0x00, 0x00, 0x81, 0x00, 0x00, 0x42, 0x00, 0x00, 0x42, 0x00,
  0x00, 0x42, 0x00, 0x00, 0x24, 0x00, 0x00, 0x24, 0x00, 0x00, 0x18, 0x00,
};

#define cross_fill_width 24
#define cross_fill_height 24
static const unsigned char cross_fill_bits[] U8X8_PROGMEM  = {
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x64, 0x00, 0x26,
  0x84, 0x00, 0x21, 0x08, 0x81, 0x10, 0x08, 0x42, 0x10, 0x10, 0x3C, 0x08,
  0x20, 0x00, 0x04, 0x40, 0x00, 0x02, 0x80, 0x00, 0x01, 0x80, 0x18, 0x01,
  0x80, 0x18, 0x01, 0x80, 0x00, 0x01, 0x40, 0x00, 0x02, 0x20, 0x00, 0x04,
  0x10, 0x3C, 0x08, 0x08, 0x42, 0x10, 0x08, 0x81, 0x10, 0x84, 0x00, 0x21,
  0x64, 0x00, 0x26, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

#define cross_block_width 14
#define cross_block_height 14
static const unsigned char cross_block_bits[] U8X8_PROGMEM  = {
  0xFF, 0x3F, 0x01, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x20,
  0xC1, 0x20, 0xC1, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x20, 0x01, 0x20,
  0x01, 0x20, 0xFF, 0x3F,
};


void u8g2_bitmap_full() {
  uint8_t transparent = 1;
  if (!transparent) {
    u8g2.setBitmapMode(false /* solid */);
    u8g2.drawStr(0, 0, "Solid bitmap");
  } else {
    u8g2.setBitmapMode(true /* transparent*/);
    u8g2.setFont(xx_font2);
    u8g2.drawStr(0, 0,  "TRANSPARENT BITMAP 0123456789");
    u8g2.setFont(xx_font);
    u8g2.drawStr(0, 20, "TRANSPARENT BITMAP 0123456789");
    u8g2.setFont(battery_7x12);
    u8g2.drawStr(0, 40, "0123456789");
  }
  u8g2.setDrawColor(1); // White
  // u8g2.setDrawColor(0);// Black
  // u8g2.drawXBMP(0, 0, full_width, full_height, full_bits);
  // u8g2.drawXBMP(50, 0, battery_width, battery_height, battery_bits);
  u8g2.drawXBMP(128 - battery_no_width, 0, battery_no_width, battery_no_height, battery_no_bits);
  //  u8g2.drawXBMP(frame_size * 2, 24, cross_width, cross_height, cross_bits);
  //  u8g2.setDrawColor(2); // XOR
  //  u8g2.drawXBMP(frame_size * 3.5, 24, cross_width, cross_height, cross_bits);
}


uint8_t draw_state = 0;

void draw(void) {
  u8g2_prepare();

  u8g2_bitmap_full() ;

}

void setup(void) {
  u8g2.begin();
}

void loop(void) {
  // picture loop
  // lightness
  u8g2.setContrast(32);
  
  u8g2.clearBuffer();
  draw();
  u8g2.sendBuffer();

  // increase the state
  draw_state++;


  // deley between each page
  delay(1000);


}
